/* 全局主题CSS变量 */
:root {
  /* 默认主题变量（浅色主题） */
  --theme-primary: #1890ff;
  --theme-secondary: #722ed1;
  --theme-success: #52c41a;
  --theme-warning: #faad14;
  --theme-error: #f5222d;
  --theme-info: #13c2c2;
  --theme-background: #f5f6fa;
  --theme-surface: #ffffff;
  --theme-text: #1a1a1a;
  --theme-textSecondary: #666666;
  --theme-border: #e0e0e0;
  --theme-shadow: rgba(0, 0, 0, 0.08);
}

/* 深色主题 */
[data-theme="dark"] {
  --theme-primary: #177ddc;
  --theme-secondary: #642ab5;
  --theme-success: #49aa19;
  --theme-warning: #d89614;
  --theme-error: #d32029;
  --theme-info: #08979c;
  --theme-background: #1a1a1a;
  --theme-surface: #2a2a2a;
  --theme-text: #ffffff;
  --theme-textSecondary: #e0e0e0;
  --theme-border: #404040;
  --theme-shadow: rgba(0, 0, 0, 0.4);
}

/* 蓝色主题 */
[data-theme="blue"] {
  --theme-primary: #1677ff;
  --theme-secondary: #4096ff;
  --theme-success: #52c41a;
  --theme-warning: #faad14;
  --theme-error: #ff4d4f;
  --theme-info: #13c2c2;
  --theme-background: #f0f8ff;
  --theme-surface: #ffffff;
  --theme-text: #1a1a1a;
  --theme-textSecondary: #666666;
  --theme-border: #d6e4ff;
  --theme-shadow: rgba(22, 119, 255, 0.08);
}

/* 绿色主题 */
[data-theme="green"] {
  --theme-primary: #52c41a;
  --theme-secondary: #73d13d;
  --theme-success: #389e0d;
  --theme-warning: #faad14;
  --theme-error: #ff4d4f;
  --theme-info: #13c2c2;
  --theme-background: #f6ffed;
  --theme-surface: #ffffff;
  --theme-text: #1a1a1a;
  --theme-textSecondary: #666666;
  --theme-border: #b7eb8f;
  --theme-shadow: rgba(82, 196, 26, 0.08);
}

/* 紫色主题 */
[data-theme="purple"] {
  --theme-primary: #722ed1;
  --theme-secondary: #9254de;
  --theme-success: #52c41a;
  --theme-warning: #faad14;
  --theme-error: #ff4d4f;
  --theme-info: #13c2c2;
  --theme-background: #f9f0ff;
  --theme-surface: #ffffff;
  --theme-text: #1a1a1a;
  --theme-textSecondary: #666666;
  --theme-border: #d3adf7;
  --theme-shadow: rgba(114, 46, 209, 0.08);
}

/* 橙色主题 */
[data-theme="orange"] {
  --theme-primary: #fa8c16;
  --theme-secondary: #ffa940;
  --theme-success: #52c41a;
  --theme-warning: #faad14;
  --theme-error: #ff4d4f;
  --theme-info: #13c2c2;
  --theme-background: #fff7e6;
  --theme-surface: #ffffff;
  --theme-text: #1a1a1a;
  --theme-textSecondary: #666666;
  --theme-border: #ffd591;
  --theme-shadow: rgba(250, 140, 22, 0.08);
}

/* 粉色主题 */
[data-theme="pink"] {
  --theme-primary: #eb2f96;
  --theme-secondary: #f759ab;
  --theme-success: #52c41a;
  --theme-warning: #faad14;
  --theme-error: #ff4d4f;
  --theme-info: #13c2c2;
  --theme-background: #fff0f6;
  --theme-surface: #ffffff;
  --theme-text: #1a1a1a;
  --theme-textSecondary: #666666;
  --theme-border: #ffadd2;
  --theme-shadow: rgba(235, 47, 150, 0.08);
}

/* 青色主题 */
[data-theme="cyan"] {
  --theme-primary: #13c2c2;
  --theme-secondary: #36cfc9;
  --theme-success: #52c41a;
  --theme-warning: #faad14;
  --theme-error: #ff4d4f;
  --theme-info: #1890ff;
  --theme-background: #e6fffb;
  --theme-surface: #ffffff;
  --theme-text: #1a1a1a;
  --theme-textSecondary: #666666;
  --theme-border: #87e8de;
  --theme-shadow: rgba(19, 194, 194, 0.08);
}

/* 红色主题 */
[data-theme="red"] {
  --theme-primary: #f5222d;
  --theme-secondary: #ff4d4f;
  --theme-success: #52c41a;
  --theme-warning: #faad14;
  --theme-error: #cf1322;
  --theme-info: #13c2c2;
  --theme-background: #fff1f0;
  --theme-surface: #ffffff;
  --theme-text: #1a1a1a;
  --theme-textSecondary: #666666;
  --theme-border: #ffa39e;
  --theme-shadow: rgba(245, 34, 45, 0.08);
}

/* 金色主题 */
[data-theme="gold"] {
  --theme-primary: #faad14;
  --theme-secondary: #ffc53d;
  --theme-success: #52c41a;
  --theme-warning: #d48806;
  --theme-error: #ff4d4f;
  --theme-info: #13c2c2;
  --theme-background: #fffbe6;
  --theme-surface: #ffffff;
  --theme-text: #1a1a1a;
  --theme-textSecondary: #666666;
  --theme-border: #ffe58f;
  --theme-shadow: rgba(250, 173, 20, 0.08);
}

/* 全局样式应用主题变量 */
body {
  background-color: var(--theme-background);
  color: var(--theme-text);
  transition: all 0.3s ease;
}

/* Ant Design Vue 组件主题覆盖 */
.ant-btn-primary {
  background-color: var(--theme-primary) !important;
  border-color: var(--theme-primary) !important;
  color: #ffffff !important;
}

.ant-btn-primary:hover {
  background-color: var(--theme-secondary) !important;
  border-color: var(--theme-secondary) !important;
  color: #ffffff !important;
}

/* 深色主题下的按钮优化 */
[data-theme="dark"] .ant-btn {
  color: #ffffff !important;
  background-color: #333333 !important;
  border-color: #555555 !important;
}

[data-theme="dark"] .ant-btn:hover {
  color: #ffffff !important;
  border-color: #777777 !important;
  background-color: #444444 !important;
}

[data-theme="dark"] .ant-btn-default {
  color: #ffffff !important;
  background-color: #333333 !important;
  border-color: #555555 !important;
}

[data-theme="dark"] .ant-btn-default:hover {
  color: #ffffff !important;
  border-color: #777777 !important;
  background-color: #444444 !important;
}

/* 深色主题下的主要按钮 */
[data-theme="dark"] .ant-btn-primary {
  background-color: #555555 !important;
  border-color: #777777 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .ant-btn-primary:hover {
  background-color: #666666 !important;
  border-color: #888888 !important;
  color: #ffffff !important;
}

.ant-menu-item-selected {
  background-color: var(--theme-primary) !important;
  color: var(--theme-surface) !important;
}

.ant-menu-item:hover {
  color: var(--theme-primary) !important;
}

/* 深色主题下的菜单优化 */
[data-theme="dark"] .ant-menu {
  background-color: #2a2a2a !important;
  color: #ffffff !important;
}

[data-theme="dark"] .ant-menu-item {
  color: #ffffff !important;
}

[data-theme="dark"] .ant-menu-item:hover {
  color: #ffffff !important;
  background-color: #444444 !important;
}

[data-theme="dark"] .ant-menu-item-selected {
  background-color: #555555 !important;
  color: #ffffff !important;
}

/* 卡片组件 */
.ant-card {
  background-color: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
  box-shadow: 0 2px 8px var(--theme-shadow) !important;
}

/* 输入框 */
.ant-input {
  background-color: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
}

.ant-input:focus {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2) !important;
}

/* 深色主题下的输入框优化 */
[data-theme="dark"] .ant-input {
  background-color: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
}

[data-theme="dark"] .ant-input:focus {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 0 2px rgba(var(--theme-primary-rgb), 0.2) !important;
}

[data-theme="dark"] .ant-input::placeholder {
  color: var(--theme-textSecondary) !important;
}

[data-theme="dark"] .ant-input-search .ant-input {
  background-color: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
}

[data-theme="dark"] .ant-input-search .ant-input:focus {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 0 2px rgba(var(--theme-primary-rgb), 0.2) !important;
}

[data-theme="dark"] .ant-input-search .ant-input::placeholder {
  color: var(--theme-textSecondary) !important;
}

[data-theme="dark"] .ant-input-search .ant-input-search-button {
  background-color: var(--theme-primary) !important;
  border-color: var(--theme-primary) !important;
  color: var(--theme-surface) !important;
}

[data-theme="dark"] .ant-input-search .ant-input-search-button:hover {
  background-color: var(--theme-secondary) !important;
  border-color: var(--theme-secondary) !important;
  color: var(--theme-surface) !important;
}

/* 下拉菜单 */
.ant-dropdown-menu {
  background-color: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
  box-shadow: 0 4px 12px var(--theme-shadow) !important;
}

.ant-dropdown-menu-item {
  color: var(--theme-text) !important;
}

.ant-dropdown-menu-item:hover {
  background-color: var(--theme-background) !important;
}

/* 深色主题下的下拉菜单优化 */
[data-theme="dark"] .ant-dropdown-menu {
  background-color: #333333 !important;
  border-color: #555555 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
}

[data-theme="dark"] .ant-dropdown-menu-item {
  color: #ffffff !important;
}

[data-theme="dark"] .ant-dropdown-menu-item:hover {
  background-color: #444444 !important;
  color: var(--theme-primary) !important;
}

/* 表格 */
.ant-table {
  background-color: var(--theme-surface) !important;
}

.ant-table-thead > tr > th {
  background-color: var(--theme-background) !important;
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
}

.ant-table-tbody > tr > td {
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
}

.ant-table-tbody > tr:hover > td {
  background-color: var(--theme-background) !important;
}

/* 深色主题下的表格优化 */
[data-theme="dark"] .ant-table {
  background-color: #2a2a2a !important;
}

[data-theme="dark"] .ant-table-thead > tr > th {
  background-color: #333333 !important;
  color: #ffffff !important;
  border-color: #555555 !important;
}

[data-theme="dark"] .ant-table-tbody > tr > td {
  border-color: #555555 !important;
  color: #ffffff !important;
  background-color: #2a2a2a !important;
}

[data-theme="dark"] .ant-table-tbody > tr:hover > td {
  background-color: #3a3a3a !important;
}

/* 分页器 */
.ant-pagination-item {
  background-color: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}

.ant-pagination-item a {
  color: var(--theme-text) !important;
}

.ant-pagination-item-active {
  background-color: var(--theme-primary) !important;
  border-color: var(--theme-primary) !important;
}

.ant-pagination-item-active a {
  color: var(--theme-surface) !important;
}

/* 深色主题下的分页器优化 */
[data-theme="dark"] .ant-pagination-item {
  background-color: #333333 !important;
  border-color: #555555 !important;
}

[data-theme="dark"] .ant-pagination-item a {
  color: #ffffff !important;
}

[data-theme="dark"] .ant-pagination-item:hover {
  border-color: #777777 !important;
}

[data-theme="dark"] .ant-pagination-item:hover a {
  color: #ffffff !important;
}

[data-theme="dark"] .ant-pagination-item-active {
  background-color: #555555 !important;
  border-color: #777777 !important;
}

[data-theme="dark"] .ant-pagination-item-active a {
  color: #ffffff !important;
}

/* 分页输入框和选择器 */
.ant-pagination .ant-pagination-options .ant-select .ant-select-selector {
  background-color: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
}

.ant-pagination .ant-pagination-options .ant-select-focused .ant-select-selector {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 0 2px var(--theme-primary) !important;
}

.ant-pagination .ant-pagination-options .ant-select .ant-select-selection-item {
  color: var(--theme-text) !important;
}

.ant-pagination .ant-pagination-options .ant-input {
  background-color: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
}

.ant-pagination .ant-pagination-options .ant-input:focus {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 0 2px var(--theme-primary) !important;
}

.ant-pagination .ant-pagination-options .ant-input::placeholder {
  color: var(--theme-textSecondary) !important;
}

/* 深色主题下的分页输入框优化 */
[data-theme="dark"] .ant-pagination .ant-pagination-options .ant-select .ant-select-selector {
  background-color: #333333 !important;
  border-color: #555555 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .ant-pagination .ant-pagination-options .ant-select-focused .ant-select-selector {
  border-color: #777777 !important;
  box-shadow: 0 0 0 2px rgba(119, 119, 119, 0.2) !important;
}

[data-theme="dark"] .ant-pagination .ant-pagination-options .ant-select .ant-select-selection-item {
  color: #ffffff !important;
}

[data-theme="dark"] .ant-pagination .ant-pagination-options .ant-input {
  background-color: #333333 !important;
  border-color: #555555 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .ant-pagination .ant-pagination-options .ant-input:focus {
  border-color: #777777 !important;
  box-shadow: 0 0 0 2px rgba(119, 119, 119, 0.2) !important;
}

[data-theme="dark"] .ant-pagination .ant-pagination-options .ant-input::placeholder {
  color: #888888 !important;
}

/* 模态框 */
.ant-modal-content {
  background-color: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}

.ant-modal-header {
  background-color: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}

.ant-modal-title {
  color: var(--theme-text) !important;
}

/* 消息提示 */
.ant-message-notice-content {
  background-color: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
}

/* 工具提示 */
.ant-tooltip-inner {
  background-color: var(--theme-surface) !important;
  color: var(--theme-text) !important;
}

.ant-tooltip-arrow::before {
  background-color: var(--theme-surface) !important;
}

/* 标签 */
.ant-tag {
  background-color: var(--theme-background) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
}

/* 深色主题下的标签优化 */
[data-theme="dark"] .ant-tag {
  background-color: #333333 !important;
  border-color: #555555 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .ant-tag:hover {
  border-color: #777777 !important;
  color: #ffffff !important;
  background-color: #444444 !important;
}

/* 进度条 */
.ant-progress-bg {
  background-color: var(--theme-primary) !important;
}

/* 开关 */
.ant-switch-checked {
  background-color: var(--theme-primary) !important;
}

/* 选择器 */
.ant-select-selector {
  background-color: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}

.ant-select-selection-item {
  color: var(--theme-text) !important;
}

/* 深色主题下的选择器优化 */
[data-theme="dark"] .ant-select-selector {
  background-color: #333333 !important;
  border-color: #555555 !important;
}

[data-theme="dark"] .ant-select-selection-item {
  color: #ffffff !important;
}

[data-theme="dark"] .ant-select-focused .ant-select-selector {
  border-color: #777777 !important;
  box-shadow: 0 0 0 2px rgba(119, 119, 119, 0.2) !important;
}

/* 日期选择器 */
.ant-picker {
  background-color: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}

.ant-picker-input > input {
  color: var(--theme-text) !important;
}

/* 时间选择器面板 */
.ant-picker-panel {
  background-color: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}

.ant-picker-panel-container {
  background-color: var(--theme-surface) !important;
}

/* 深色主题下的单选按钮组优化 */
[data-theme="dark"] .ant-radio-button-wrapper {
  background-color: #333333 !important;
  border-color: #555555 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .ant-radio-button-wrapper:hover {
  color: #ffffff !important;
  border-color: #777777 !important;
  background-color: #444444 !important;
}

[data-theme="dark"] .ant-radio-button-wrapper-checked {
  background-color: #555555 !important;
  border-color: #777777 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .ant-radio-button-wrapper-checked:hover {
  background-color: #666666 !important;
  border-color: #888888 !important;
  color: #ffffff !important;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--theme-background);
}

::-webkit-scrollbar-thumb {
  background: var(--theme-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--theme-textSecondary);
} 

/* 全局修复浏览器自动填充状态下的样式问题 */
/* Webkit浏览器 (Chrome, Safari, Edge) */
.ant-input:-webkit-autofill,
.ant-input:-webkit-autofill:hover,
.ant-input:-webkit-autofill:focus,
.ant-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--theme-surface) inset !important;
  -webkit-text-fill-color: var(--theme-text) !important;
  background-color: var(--theme-surface) !important;
  background-clip: content-box !important;
  transition: all 0.3s ease !important;
}

/* 修复输入框包装器的自动填充样式 */
.ant-input-affix-wrapper .ant-input:-webkit-autofill,
.ant-input-affix-wrapper .ant-input:-webkit-autofill:hover,
.ant-input-affix-wrapper .ant-input:-webkit-autofill:focus,
.ant-input-affix-wrapper .ant-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--theme-surface) inset !important;
  -webkit-text-fill-color: var(--theme-text) !important;
  background-color: var(--theme-surface) !important;
  background-clip: content-box !important;
  transition: all 0.3s ease !important;
}

/* Firefox浏览器 */
.ant-input:-moz-autofill,
.ant-input:-moz-autofill:focus {
  background-color: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  transition: all 0.3s ease !important;
}

/* 确保自动填充状态下的输入框样式与主题一致 */
.ant-input[data-autofill="true"],
.ant-input[data-autofill="true"]:hover,
.ant-input[data-autofill="true"]:focus {
  background-color: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
  transition: all 0.3s ease !important;
}

/* 修复自动填充状态下的焦点样式 */
.ant-input:-webkit-autofill:focus {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 0 2px rgba(var(--theme-primary-rgb), 0.2) !important;
  transition: all 0.3s ease !important;
}

/* 修复自动填充状态下的悬停样式 */
.ant-input:-webkit-autofill:hover {
  border-color: var(--theme-primary) !important;
  transition: all 0.3s ease !important;
}

/* 确保所有输入框在自动填充状态下都使用主题颜色 */
.ant-input-affix-wrapper .ant-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--theme-surface) inset !important;
  -webkit-text-fill-color: var(--theme-text) !important;
  background-color: var(--theme-surface) !important;
  background-clip: content-box !important;
  transition: all 0.3s ease !important;
}

/* 修复自动填充状态下的图标颜色 */
.ant-input-affix-wrapper .ant-input:-webkit-autofill ~ .anticon {
  color: var(--theme-textSecondary) !important;
  transition: color 0.3s ease !important;
}

/* 修复自动填充状态下的边框样式 */
.ant-input-affix-wrapper:has(.ant-input:-webkit-autofill) {
  border-color: var(--theme-border) !important;
  transition: all 0.3s ease !important;
}

.ant-input-affix-wrapper:has(.ant-input:-webkit-autofill):hover {
  border-color: var(--theme-primary) !important;
  transition: all 0.3s ease !important;
}

.ant-input-affix-wrapper:has(.ant-input:-webkit-autofill):focus-within {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 0 2px rgba(var(--theme-primary-rgb), 0.2) !important;
  transition: all 0.3s ease !important;
} 